﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Inovout.Organizations.Models
{
    public partial class OrganizationUnit : IOrganizationResource
    {
        private List<OrganizationUnit> children = new List<OrganizationUnit>();
        public virtual List<OrganizationUnit> Children
        {
            get { return children; }
            set { children = value; }
        }
        private OrganizationUnit parent;
        public virtual OrganizationUnit Parent
        {
            get { return parent; }
            set { parent = value; }
        }
        private List<Position> positions = new List<Position>();
        public virtual List<Position> Positions
        {
            get { return positions; }
            set { positions = value; }
        }

        private string email { get; set; }
        [Required(ErrorMessage="邮箱地址不可为空")]
        [EmailAddress(ErrorMessage = "请输入正确的电子邮箱格式")]
        [Alias("邮箱地址")]
        public virtual string Email
        {
            get { return email; }
            set { email = value; }
        }
    }
}
